package springcloud.controller;


import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RestController;
import springcloud.entity.Result;
import springcloud.service.MemberFeignService;

import javax.annotation.Resource;

@SuppressWarnings("all")
@RestController
public class MemberConsumerFeignController {

    //装配自定义的接口对象
    @Resource
    private MemberFeignService memberFeignService;

    //定义方法
    @GetMapping("/member/consumer/openfeign/query/{id}")
    public Result queryMemberById(@PathVariable("id") Long id) {
        //调用接口中的方法，从而实现远程调用 微服务提供模块
        return memberFeignService.queryMemberById(id);
    }
}
